clarkkent
02/14/2025, 12:49 PMcurl -X PATCH https://api.vapi.ai/tool/toolcallId \
-H "Authorization: Bearer vapiapikey" \
-H "Content-Type: application/json" \
-d '{
"function": {
"name": "toolcallname",
"description": "some description",
"parameters": {
"type": "object",
"properties": {}
}
},
"server": {
"url": "webhookurl",
"timeoutSeconds": 30,
"headers": {
"x-vapi-secret": "Bearer API_KEY"
}
},
"async": false
}'clarkkent
02/14/2025, 12:56 PMcurl -X POST <server_url> \
-H "authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"eventType": "test.event",
"payload": {
"message": {
"toolCalls": [{
"id": "test123",
"function": {
"name": "test_function",
"arguments": {"test": "data"}
}
}]
}
}
}'Chiranjeet Mishra
02/14/2025, 5:56 PMclarkkent
02/15/2025, 12:38 AMChiranjeet Mishra
02/15/2025, 10:41 PM{
"type": "tool-calls",
"toolCalls": [
{
"id": "call_DE6TZISulSwOuVKDFQHZSoiW",
"type": "function",
"function": {
"name": "getPractitionerByAssistantIdDev",
"arguments": {}
}
}
],
"toolCallList": [
{
"id": "call_DE6TZISulSwOuVKDFQHZSoiW",
"type": "function",
"function": {
"name": "getPractitionerByAssistantIdDev",
"arguments": {}
}
}
],
"toolWithToolCallList": [
{
"type": "function",
"function": {
"name": "getPractitionerByAssistantIdDev",
"parameters": {
"type": "object",
"properties": {}
},
"description": "Get practitioner information based on assistant ID"
},
"async": false,
"server": {
"url": "https://api.eu.svxxxxxx/msg",
"headers": {
"Authorization": "Bearer testsk_FDxxxxxxxxxxxxxxxhG.eu"
},
"timeoutSeconds": 30
},
"messages": [],
"toolCall": {
"id": "call_DE6TZISulSwOuVKDFQHZSoiW",
"type": "function",
"function": {
"name": "getPractitionerByAssistantIdDev",
"arguments": {}
}
}
}
]
}Chiranjeet Mishra
02/15/2025, 10:42 PMclarkkent
02/15/2025, 11:29 PMclarkkent
02/15/2025, 11:31 PMclarkkent
02/15/2025, 11:38 PMChiranjeet Mishra
02/17/2025, 6:51 AMclarkkent
02/17/2025, 10:35 AMcurl -X PATCH https://api.vapi.ai/tool/toolcallId \
-H "Authorization: Bearer vapiapikey" \
-H "Content-Type: application/json" \
-d '{
"function": {
"name": "toolcallname",
"description": "some description",
"parameters": {
"type": "object",
"properties": {}
}
},
"server": {
"url": "webhookurl",
"timeoutSeconds": 30,
"headers": {
"authorization": "Bearer API_KEY"
}
},
"async": false
}'Chiranjeet Mishra
02/17/2025, 4:22 PMChiranjeet Mishra
02/17/2025, 4:22 PMclarkkent
02/19/2025, 2:08 AMcurl -X PATCH https://api.vapi.ai/tool/toolcallId \
-H "Authorization: Bearer vapiapikey" \
-H "Content-Type: application/json" \
-d '{
"function": {
"name": "toolcallname",
"description": "some description",
"parameters": {
"type": "object",
"properties": {}
}
},
"server": {
"url": "webhookurl",
"timeoutSeconds": 30,
"headers": {
"authorization": "Bearer API_KEY"
}
},
"async": false
}'
Hi I tried above..
Its pretty much the same story
Do I change the header names ? to something else
I am under the assumption "X-Custom-Header" ---> means here the "authorization" key*Shubham Bajaj
02/22/2025, 9:05 AMexport class Server {
/**
*
* API endpoint to send requests to.
*/
@IsString()
@IsUrlWithHelpfulError({
protocols: ['https', 'wss'],
require_protocol: true,
})
@IsOptional()
url: string;
/**
* This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret.
*
* Same precedence logic as server.
*/
@Exclude({ toPlainOnly: true })
@IsOptional()
@IsString()
secret?: string;
/**
* This is the timeout in seconds for the request to your server. Defaults to 20 seconds.
*
* @default 20
*/
@IsOptional()
@IsNumberWithHelpfulError()
@Min(1)
@Max(120)
@ApiPropertyOptional({ example: 20 })
timeoutSeconds?: number;
/**
* These are the custom headers to include in the request sent to your server.
*
* Each key-value pair represents a header name and its value.
*/
@IsOptional()
@IsObject()
@IsReasonaleSizeWithHelpfulError({ maxLength: 100000 })
headers?: Record<string, string>;
/**
* This is the backoff plan to use if the request fails.
*/
@IsOptional()
@IsObject()
@ValidateNested()
@Type(() => BackoffPlan)
backoffPlan?: BackoffPlan;
}clarkkent
02/27/2025, 5:10 AMChiranjeet Mishra
03/02/2025, 2:01 PM